﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using 开单.Frm.基础;
using 开单.DB;
using 开单.Frm.销售;

namespace 开单
{
    public partial class FrmMain : Form
    {

        public FrmMain()
        {
            InitializeComponent();
            GlobalVar.frmMain = this;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FrmXskd.GetInstance().Show();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            FrmXsth.GetInstance().Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            FrmYgxx.GetInstance().Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            FrmKhxx.GetInstance().Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            FrmHpxx.GetInstance().Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            FrmXsdInfo.GetInstance().ShowDialog();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            FrmYhxx.GetInstance().ShowDialog();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            FrmXgmm frmxgmm = new FrmXgmm();
            frmxgmm.ShowDialog();
        }

        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            GlobalVar.frmLogin.Close();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            XsdDao xsd = new XsdDao();
            XsdEntity xsdEntity=new XsdEntity();
            XsmxEntity xsmxEntity = new XsmxEntity();
            XsmxDao xsmx = new XsmxDao();
            for(int i=1000;i<10000;i++)
            {
                xsdEntity.xsd_code=i.ToString();
                xsdEntity.xsd_kdr=i.ToString();
                xsdEntity.xsd_kdsj = DataUtil.GetStandardTimeBySecond();
                xsdEntity.xsd_kh=i.ToString();
                xsdEntity.xsd_khdh = i.ToString();
                xsdEntity.xsd_shr=i.ToString();
                xsdEntity.xsd_shdz = i.ToString();
                xsdEntity.xsd_shsj=i.ToString();
                xsdEntity.xsd_ywy=i.ToString();
                xsd.Addxsxx(xsdEntity);
                xsmxEntity.xsd_code = xsdEntity.xsd_code;
                xsmxEntity.xsmx_dj = i;
                xsmxEntity.xsmx_dw = i.ToString();
                xsmxEntity.xsmx_gg = i.ToString();
                xsmxEntity.xsmx_pm = i.ToString();
                xsmxEntity.xsmx_sl = i;
                xsmx.Addxsmx(xsmxEntity);
            }
        }


    }
}
